package doit.gen.test;

import java.io.ObjectStreamClass;

import doit.gen.util.GeneratorUtil;

public class SerialVersionBuilder {
    /**
     * build a SerialVersionUID for the class specified
     * @param clazz
     * @return
     */
    public static long buildSerialVersion(Class clazz){
        ObjectStreamClass streamClass = ObjectStreamClass.lookup(clazz);
        if(null != streamClass){
            return streamClass.getSerialVersionUID();
        }
        return 0L;
    }
    
    public static void main(String[] args) {
        System.out.println( buildSerialVersion(GeneratorUtil.class));
    }
}
